package com.wyg.epkafkastarter.config;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @Author: WangYongGan
 * @Date: 2022/5/18 0:56
 * @Description:
 */
public class ProducerCondition implements Condition {
    //type ==1 或 2
    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        return KafkaConfigProperties.type!=0;
    }
}
